﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Media.Animation;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace dodone
{
    /// <summary>
    /// Interaction logic for DoDoneWindow.xaml
    /// </summary>
    public partial class DoDoneWindow : Window
    {
        public DoDoneWindow()
        {
            InitializeComponent();
        }

		/*
        public void FlipLayout(UIElement Src, UIElement Des)
        {

            if (Src == null || Des == null) return;

            Storyboard FlipStoryBoard = new Storyboard();
            Storyboard.SetTargetProperty(FlipStoryBoard, new
            PropertyPath("(UIElement.RenderTransform).(ScaleTransform.ScaleY)"));

            Src.RenderTransformOrigin = new Point(0.5, 0.5);
            Des.RenderTransformOrigin = new Point(0.5, 0.5);

            Src.RenderTransform = new ScaleTransform(1, 1);
            Des.RenderTransform = new ScaleTransform(1, 0);

            DoubleAnimation OutAnimation = new DoubleAnimation(1, 0, TimeSpan.FromMilliseconds(200));
            DoubleAnimation InAnimation = new DoubleAnimation(0, 1, TimeSpan.FromMilliseconds(200));
            InAnimation.BeginTime = TimeSpan.FromMilliseconds(100);

            Storyboard.SetTargetName(OutAnimation, (Src as FrameworkElement).Name);
            Storyboard.SetTargetName(InAnimation, (Des as FrameworkElement).Name);

            FlipStoryBoard.Children.Add(OutAnimation);
            FlipStoryBoard.Children.Add(InAnimation);

            FlipStoryBoard.Begin(this);
        }

        bool Firsts = true;
        private void Button_Click(object sender, RoutedEventArgs e)
        {

            if (!Firsts)
                FlipLayout(First, Second);
            else
                FlipLayout(Second, First);

            Firsts = !Firsts;
        }
		*/
    }
}
